﻿''' <summary>Generic Contact schema</summary>
Public Class Contact
    Inherits Indexable



    Public Sub New(ByVal content As String, ByVal format As IndexFormats, ByVal uri As String, ByVal last_modified_time As Date)
        MyBase.New(content, format)
        Me._uri = uri
        Me._last_modified_time = last_modified_time

    End Sub

    ''' <summary>Unique identifier </summary>
    ''' <remarks> required  </remarks>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _uri As String
    ''' <summary>Time last modified </summary>
    ''' <remarks> required  </remarks>
    Private _last_modified_time As Date



    ''' <summary>Title </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _title As String
    ''' <summary>Folder name </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _folder_name As String
    ''' <summary>Assistant name </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _assistant As String
    ''' <summary>Birthday </summary>
    Private _birthday As Date
    ''' <summary>Business address </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _business_address As String
    ''' <summary>Business phone </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _business_phone As String
    ''' <summary>Business fax </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _business_fax As String
    ''' <summary>Business home page </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _business_home_page As String
    ''' <summary>Contact categories </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _categories As String
    ''' <summary>Mobile phone number </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _mobile_phone As String
    ''' <summary>Children names </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _children_names As String
    ''' <summary>Company name </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _company_name As String
    ''' <summary>Company phone </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _company_phone As String
    ''' <summary>Country </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _country As String
    ''' <summary>Department </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _department As String
    ''' <summary>Display name </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _display_name As String
    ''' <summary>Email address 1 </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _email1 As String
    ''' <summary>Email address 2 </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _email2 As String
    ''' <summary>Email address 3 </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _email3 As String
    ''' <summary>Pager </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _pager As String
    ''' <summary>Spouse </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _spouse As String
    ''' <summary>Hobbies </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _hobbies As String
    ''' <summary>Home address </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _home_address As String
    ''' <summary>Home fax </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _home_fax As String
    ''' <summary>Home phone </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _home_phone As String
    ''' <summary>IM address </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _im_address As String
    ''' <summary>Job title </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _job_title As String
    ''' <summary>Language </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _language As String
    ''' <summary>Manager name </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _manager_name As String
    ''' <summary>Nickname </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _nickname As String
    ''' <summary>Office location </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _office_location As String
    ''' <summary>Other address </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _other_address As String
    ''' <summary>Personal home page </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _personal_home_page As String
    ''' <summary>Other phone </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _other_phone As String
    ''' <summary>Primary fax </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _primary_fax As String
    ''' <summary>Primary phone </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _primary_phone As String
    ''' <summary>Profession </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _profession As String
    ''' <summary>Web page </summary>
    <MarshalAs(UnmanagedType.BStr)> _
    Private _web_page As String
    ''' <summary>Wedding anniversary </summary>
    Private _wedding_anniversary As Date




    ''' <summary>Assistant name </summary>
    Public Property Assistant() As String
        Get
            Return _assistant
        End Get
        Set(ByVal value As String)
            _assistant = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Birthday </summary>
    Public Property Birthday() As Date
        Get
            Return _birthday
        End Get
        Set(ByVal value As Date)
            _birthday = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Business address </summary>
    Public Property Business_address() As String
        Get
            Return _business_address
        End Get
        Set(ByVal value As String)
            _business_address = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Business fax </summary>
    Public Property Business_fax() As String
        Get
            Return _business_fax
        End Get
        Set(ByVal value As String)
            _business_fax = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Business home page </summary>
    Public Property Business_home_page() As String
        Get
            Return _business_home_page
        End Get
        Set(ByVal value As String)
            _business_home_page = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Business phone </summary>
    Public Property Business_phone() As String
        Get
            Return _business_phone
        End Get
        Set(ByVal value As String)
            _business_phone = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Contact categories </summary>
    Public Property Categories() As String
        Get
            Return _categories
        End Get
        Set(ByVal value As String)
            _categories = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Children names </summary>
    Public Property Children_names() As String
        Get
            Return _children_names
        End Get
        Set(ByVal value As String)
            _children_names = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Company name </summary>
    Public Property Company_name() As String
        Get
            Return _company_name
        End Get
        Set(ByVal value As String)
            _company_name = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Company phone </summary>
    Public Property Company_phone() As String
        Get
            Return _company_phone
        End Get
        Set(ByVal value As String)
            _company_phone = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Country </summary>
    Public Property Country() As String
        Get
            Return _country
        End Get
        Set(ByVal value As String)
            _country = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Department </summary>
    Public Property Department() As String
        Get
            Return _department
        End Get
        Set(ByVal value As String)
            _department = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Display name </summary>
    Public Property Display_name() As String
        Get
            Return _display_name
        End Get
        Set(ByVal value As String)
            _display_name = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Email address 1 </summary>
    Public Property Email1() As String
        Get
            Return _email1
        End Get
        Set(ByVal value As String)
            _email1 = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Email address 2 </summary>
    Public Property Email2() As String
        Get
            Return _email2
        End Get
        Set(ByVal value As String)
            _email2 = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Email address 3 </summary>
    Public Property Email3() As String
        Get
            Return _email3
        End Get
        Set(ByVal value As String)
            _email3 = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Folder name </summary>
    Public Property Folder_name() As String
        Get
            Return _folder_name
        End Get
        Set(ByVal value As String)
            _folder_name = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Hobbies </summary>
    Public Property Hobbies() As String
        Get
            Return _hobbies
        End Get
        Set(ByVal value As String)
            _hobbies = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Home address </summary>
    Public Property Home_address() As String
        Get
            Return _home_address
        End Get
        Set(ByVal value As String)
            _home_address = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Home fax </summary>
    Public Property Home_fax() As String
        Get
            Return _home_fax
        End Get
        Set(ByVal value As String)
            _home_fax = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Home phone </summary>
    Public Property Home_phone() As String
        Get
            Return _home_phone
        End Get
        Set(ByVal value As String)
            _home_phone = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>IM address </summary>
    Public Property Im_address() As String
        Get
            Return _im_address
        End Get
        Set(ByVal value As String)
            _im_address = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Job title </summary>
    Public Property Job_title() As String
        Get
            Return _job_title
        End Get
        Set(ByVal value As String)
            _job_title = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Language </summary>
    Public Property Language() As String
        Get
            Return _language
        End Get
        Set(ByVal value As String)
            _language = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Time last modified </summary>
    ''' <remarks> required  </remarks>
    Public ReadOnly Property Last_modified_time() As Date
        Get
            Return _last_modified_time
        End Get
    End Property

    ''' <summary>Manager name </summary>
    Public Property Manager_name() As String
        Get
            Return _manager_name
        End Get
        Set(ByVal value As String)
            _manager_name = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Mobile phone number </summary>
    Public Property Mobile_phone() As String
        Get
            Return _mobile_phone
        End Get
        Set(ByVal value As String)
            _mobile_phone = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Nickname </summary>
    Public Property Nickname() As String
        Get
            Return _nickname
        End Get
        Set(ByVal value As String)
            _nickname = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Office location </summary>
    Public Property Office_location() As String
        Get
            Return _office_location
        End Get
        Set(ByVal value As String)
            _office_location = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Other address </summary>
    Public Property Other_address() As String
        Get
            Return _other_address
        End Get
        Set(ByVal value As String)
            _other_address = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Other phone </summary>
    Public Property Other_phone() As String
        Get
            Return _other_phone
        End Get
        Set(ByVal value As String)
            _other_phone = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Pager </summary>
    Public Property Pager() As String
        Get
            Return _pager
        End Get
        Set(ByVal value As String)
            _pager = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Personal home page </summary>
    Public Property Personal_home_page() As String
        Get
            Return _personal_home_page
        End Get
        Set(ByVal value As String)
            _personal_home_page = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Primary fax </summary>
    Public Property Primary_fax() As String
        Get
            Return _primary_fax
        End Get
        Set(ByVal value As String)
            _primary_fax = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Primary phone </summary>
    Public Property Primary_phone() As String
        Get
            Return _primary_phone
        End Get
        Set(ByVal value As String)
            _primary_phone = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Profession </summary>
    Public Property Profession() As String
        Get
            Return _profession
        End Get
        Set(ByVal value As String)
            _profession = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Spouse </summary>
    Public Property Spouse() As String
        Get
            Return _spouse
        End Get
        Set(ByVal value As String)
            _spouse = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Title </summary>
    Public Property Title() As String
        Get
            Return _title
        End Get
        Set(ByVal value As String)
            _title = value
            SetOtherPropertiesFlag()
        End Set
    End Property


    ''' <summary>Unique identifier </summary>
    ''' <remarks> required  </remarks>
    Public ReadOnly Property Uri() As String
        Get
            Return _uri
        End Get
    End Property
    ''' <summary>Web page </summary>
    Public Property Web_page() As String
        Get
            Return _web_page
        End Get
        Set(ByVal value As String)
            _web_page = value
            SetOtherPropertiesFlag()
        End Set
    End Property
    ''' <summary>Wedding anniversary </summary>
    Public Property Wedding_anniversary() As Date
        Get
            Return _wedding_anniversary
        End Get
        Set(ByVal value As Date)
            _wedding_anniversary = value
            SetOtherPropertiesFlag()
        End Set
    End Property


    Protected Overrides Sub AddRequredProperties(ByVal e As [Event])
        MyBase.AddRequredProperties(e)

        e.AddProperty("uri", Me._uri)
        e.AddProperty("last_modified_time", Me._last_modified_time.ToOADate)

    End Sub

    Protected Overrides Sub AddOtherProperties(ByVal e As [Event])
        MyBase.AddOtherProperties(e)



        If Not String.IsNullOrEmpty(_title) Then e.AddProperty(_title, _title)

        If Not String.IsNullOrEmpty(_folder_name) Then e.AddProperty("folder_name", _folder_name)


        If Not String.IsNullOrEmpty(_assistant) Then e.AddProperty("assistant", _assistant)

        e.AddProperty("birthday", _birthday.ToOADate)

        If Not String.IsNullOrEmpty(_business_address) Then e.AddProperty("business_address", _business_address)
   
        If Not String.IsNullOrEmpty(_business_fax) Then e.AddProperty("business_fax", _business_fax)

        If Not String.IsNullOrEmpty(_business_home_page) Then e.AddProperty("business_home_page", _business_home_page)

        If Not String.IsNullOrEmpty(_categories) Then e.AddProperty("categories", _categories)

        If Not String.IsNullOrEmpty(_mobile_phone) Then e.AddProperty("mobile_phone", _mobile_phone)
    
        If Not String.IsNullOrEmpty(_children_names) Then e.AddProperty("children_names", _children_names)

        If Not String.IsNullOrEmpty(_company_name) Then e.AddProperty("company_name", _company_name)

        If Not String.IsNullOrEmpty(_company_phone) Then e.AddProperty("company_phone", _company_phone)

        If Not String.IsNullOrEmpty(_country) Then e.AddProperty("country", _country)

        If Not String.IsNullOrEmpty(_department) Then e.AddProperty("department", _department)

        If Not String.IsNullOrEmpty(_display_name) Then e.AddProperty("display_name", _display_name)

        If Not String.IsNullOrEmpty(_company_phone) Then e.AddProperty("company_phone", _company_phone)

        If Not String.IsNullOrEmpty(_email1) Then e.AddProperty("email1", _email1)
        If Not String.IsNullOrEmpty(_email2) Then e.AddProperty("email2", _email2)
        If Not String.IsNullOrEmpty(_email3) Then e.AddProperty("email3", _email3)

        If Not String.IsNullOrEmpty(_pager) Then e.AddProperty("pager", _pager)


        If Not String.IsNullOrEmpty(_spouse) Then e.AddProperty("spouse", _spouse)
        If Not String.IsNullOrEmpty(_hobbies) Then e.AddProperty("hobbies", _hobbies)

        If Not String.IsNullOrEmpty(_home_address) Then e.AddProperty("home_address", _home_address)
        If Not String.IsNullOrEmpty(_home_fax) Then e.AddProperty("home_fax", _home_fax)
        If Not String.IsNullOrEmpty(_home_phone) Then e.AddProperty("home_phone", _home_phone)

        If Not String.IsNullOrEmpty(_im_address) Then e.AddProperty("im_address", _im_address)

        If Not String.IsNullOrEmpty(_job_title) Then e.AddProperty("job_title", _job_title)
        If Not String.IsNullOrEmpty(_language) Then e.AddProperty("language", _language)
        If Not String.IsNullOrEmpty(_manager_name) Then e.AddProperty("manager_name", _manager_name)



        If Not String.IsNullOrEmpty(_nickname) Then e.AddProperty("nickname", _nickname)
        If Not String.IsNullOrEmpty(_office_location) Then e.AddProperty("office_location", _office_location)
        If Not String.IsNullOrEmpty(_other_address) Then e.AddProperty("other_address", _other_address)
       
        If Not String.IsNullOrEmpty(_personal_home_page) Then e.AddProperty("personal_home_page", _personal_home_page)
        If Not String.IsNullOrEmpty(_other_phone) Then e.AddProperty("other_phone", _other_phone)



        If Not String.IsNullOrEmpty(_primary_fax) Then e.AddProperty("primary_fax", _primary_fax)
 
        If Not String.IsNullOrEmpty(_primary_phone) Then e.AddProperty("primary_phone", _primary_phone)
        If Not String.IsNullOrEmpty(_web_page) Then e.AddProperty("web_page", _web_page)



        e.AddProperty("wedding_anniversary", _wedding_anniversary)



    End Sub


  


End Class

